<?php include $this->admin_tpl('meta');?>
<title>修改资料 - YzmCMS内容管理系统</title>
</head>
<body>
<article class="page-container">
<div class="formdoby_normal"> 
	<form method="post" onsubmit="return dosub(this)">
		<ul>
			 <li><label>用户名：</label><?php echo $data['adminname'];?></li>
			 <li><label>所属角色：</label><?php echo $data['rolename'];?></li>
			 <li><label>最后登录IP：</label><?php echo $data['loginip'];?></li>
			 <li><label>最后登录时间：</label><?php echo date('Y-m-d H:i:s',$data['logintime']);?></li>
			 <li class="yzm-explain-box"><label>昵称：</label><input type="text" class="input" placeholder="发布内容时显示" name="nickname" value="<?php echo $data['nickname'];?>"> <span class="yzm-explain">发布内容时显示，<br>修改后重新登录生效.</span></li>
			 <li><label>邮箱：</label><input type="text" class="input" placeholder="邮箱" name="email" value="<?php echo $data['email'];?>"></li>
			 <li><label>真实姓名：</label><input type="text" class="input" placeholder="真实姓名" name="realname" value="<?php echo $data['realname'];?>"></li>
		</ul>
		<div class="footer_btn">
			<input type="hidden" name="dosubmit" value="1">
			<input class="btn btn-primary radius" type="submit" value="提 交">
			<input class="btn btn-default radius" type="button" value="取 消" onclick="yzmcms_close()">	
		</div>
	</form>
</div>
</article>
<?php include $this->admin_tpl('footer');?> 
<script type="text/javascript">
	function dosub(obj){

		$.ajax({
		 type: 'POST',
		 url: '<?php echo U('public_edit_info');?>', 
		 data: $(obj).serialize(),
		 dataType: "json", 
		 success: function (msg) {
			if(msg.status == 1){
				var index = parent.layer.getFrameIndex(window.name);
				layer.msg(msg.message, {icon:1, time:2000}, function(){
					parent.layer.close(index);
				});
		    }else{
				layer.msg(msg.message, {icon:2});
			}
		 }
		})

		return false;			 
	}
</script> 
</body>
</html>